Integrand size = 20, antiderivative size = 271 \[ \int \frac {(c+d x)^3}{(a+a \cos (e+f x))^2} \, dx=-\frac {i (c+d x)^3}{3 a^2 f}+\frac {2 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a^2 f^2}+\frac {4 d^3 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a^2 f^4}-\frac {4 i d^2 (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{a^2 f^3}+\frac {4 d^3 \operatorname {PolyLog}\left (3,-e^{i (e+f x)}\right )}{a^2 f^4}-\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f} \]
[Out]
Time = 0.40 (sec) , antiderivative size = 271, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.450, Rules used = {3399, 4271, 4269, 3556, 3800, 2221, 2611, 2320, 6724} \[ \int \frac {(c+d x)^3}{(a+a \cos (e+f x))^2} \, dx=-\frac {4 i d^2 (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{a^2 f^3}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}+\frac {2 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a^2 f^2}-\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f}-\frac {i (c+d x)^3}{3 a^2 f}+\frac {4 d^3 \operatorname {PolyLog}\left (3,-e^{i (e+f x)}\right )}{a^2 f^4}+\frac {4 d^3 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a^2 f^4} \]
[In]
[Out]
Rule 2221
Rule 2320
Rule 2611
Rule 3399
Rule 3556
Rule 3800
Rule 4269
Rule 4271
Rule 6724
Rubi steps \begin{align*} \text {integral}& = \frac {\int (c+d x)^3 \csc ^4\left (\frac {e+\pi }{2}+\frac {f x}{2}\right ) \, dx}{4 a^2} \\ & = -\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {(c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f}+\frac {\int (c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \, dx}{6 a^2}+\frac {d^2 \int (c+d x) \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \, dx}{a^2 f^2} \\ & = -\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f}-\frac {\left (2 d^3\right ) \int \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) \, dx}{a^2 f^3}-\frac {d \int (c+d x)^2 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) \, dx}{a^2 f} \\ & = -\frac {i (c+d x)^3}{3 a^2 f}+\frac {4 d^3 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a^2 f^4}-\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f}+\frac {(2 i d) \int \frac {e^{2 i \left (\frac {e}{2}+\frac {f x}{2}\right )} (c+d x)^2}{1+e^{2 i \left (\frac {e}{2}+\frac {f x}{2}\right )}} \, dx}{a^2 f} \\ & = -\frac {i (c+d x)^3}{3 a^2 f}+\frac {2 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a^2 f^2}+\frac {4 d^3 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a^2 f^4}-\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f}-\frac {\left (4 d^2\right ) \int (c+d x) \log \left (1+e^{2 i \left (\frac {e}{2}+\frac {f x}{2}\right )}\right ) \, dx}{a^2 f^2} \\ & = -\frac {i (c+d x)^3}{3 a^2 f}+\frac {2 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a^2 f^2}+\frac {4 d^3 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a^2 f^4}-\frac {4 i d^2 (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{a^2 f^3}-\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f}+\frac {\left (4 i d^3\right ) \int \operatorname {PolyLog}\left (2,-e^{2 i \left (\frac {e}{2}+\frac {f x}{2}\right )}\right ) \, dx}{a^2 f^3} \\ & = -\frac {i (c+d x)^3}{3 a^2 f}+\frac {2 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a^2 f^2}+\frac {4 d^3 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a^2 f^4}-\frac {4 i d^2 (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{a^2 f^3}-\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f}+\frac {\left (4 d^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-x)}{x} \, dx,x,e^{2 i \left (\frac {e}{2}+\frac {f x}{2}\right )}\right )}{a^2 f^4} \\ & = -\frac {i (c+d x)^3}{3 a^2 f}+\frac {2 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a^2 f^2}+\frac {4 d^3 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a^2 f^4}-\frac {4 i d^2 (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{a^2 f^3}+\frac {4 d^3 \operatorname {PolyLog}\left (3,-e^{i (e+f x)}\right )}{a^2 f^4}-\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f} \\ \end{align*}
Time = 1.09 (sec) , antiderivative size = 250, normalized size of antiderivative = 0.92 \[ \int \frac {(c+d x)^3}{(a+a \cos (e+f x))^2} \, dx=\frac {2 \cos \left (\frac {1}{2} (e+f x)\right ) \left (-3 d f^2 (c+d x)^2 \cos \left (\frac {1}{2} (e+f x)\right )+f^3 (c+d x)^3 \sin \left (\frac {1}{2} (e+f x)\right )+12 d^2 \cos ^3\left (\frac {1}{2} (e+f x)\right ) \left (2 d \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+f (c+d x) \tan \left (\frac {1}{2} (e+f x)\right )\right )-2 \cos ^3\left (\frac {1}{2} (e+f x)\right ) \left (i f^3 (c+d x)^3-6 d \left (f^2 (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )-2 i d f (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )+2 d^2 \operatorname {PolyLog}\left (3,-e^{i (e+f x)}\right )\right )-f^3 (c+d x)^3 \tan \left (\frac {1}{2} (e+f x)\right )\right )\right )}{3 a^2 f^4 (1+\cos (e+f x))^2} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 677 vs. \(2 (231 ) = 462\).
Time = 2.92 (sec) , antiderivative size = 678, normalized size of antiderivative = 2.50
method | result | size |
risch | \(-\frac {2 i d^{3} x^{3}}{3 a^{2} f}-\frac {4 i d^{2} c e x}{a^{2} f^{2}}+\frac {4 d^{2} c \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) x}{a^{2} f^{2}}-\frac {4 i d^{2} c \,\operatorname {Li}_{2}\left (-{\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{3}}+\frac {4 d^{2} c e \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{3}}-\frac {2 i d^{2} c \,e^{2}}{a^{2} f^{3}}-\frac {2 i d^{2} c \,x^{2}}{a^{2} f}+\frac {4 i d^{3} e^{3}}{3 a^{2} f^{4}}+\frac {2 i \left (3 i c^{2} d f \,{\mathrm e}^{i \left (f x +e \right )}+3 d^{3} f^{2} x^{3} {\mathrm e}^{i \left (f x +e \right )}+6 i c \,d^{2} f x \,{\mathrm e}^{2 i \left (f x +e \right )}+3 i d^{3} f \,x^{2} {\mathrm e}^{i \left (f x +e \right )}+9 c \,d^{2} f^{2} x^{2} {\mathrm e}^{i \left (f x +e \right )}+d^{3} x^{3} f^{2}+3 i d^{3} f \,x^{2} {\mathrm e}^{2 i \left (f x +e \right )}+3 i c^{2} d f \,{\mathrm e}^{2 i \left (f x +e \right )}+9 c^{2} d \,f^{2} x \,{\mathrm e}^{i \left (f x +e \right )}+3 c \,d^{2} f^{2} x^{2}+6 i c \,d^{2} f x \,{\mathrm e}^{i \left (f x +e \right )}+3 c^{3} f^{2} {\mathrm e}^{i \left (f x +e \right )}+3 c^{2} d \,f^{2} x +6 d^{3} x \,{\mathrm e}^{2 i \left (f x +e \right )}+c^{3} f^{2}+6 c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}+12 d^{3} x \,{\mathrm e}^{i \left (f x +e \right )}+12 c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}+6 d^{3} x +6 d^{2} c \right )}{3 f^{3} a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3}}+\frac {2 i d^{3} e^{2} x}{a^{2} f^{3}}+\frac {2 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) x^{2}}{a^{2} f^{2}}-\frac {2 d \,c^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{2}}+\frac {2 d \,c^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{a^{2} f^{2}}-\frac {2 d^{3} e^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{4}}-\frac {4 i d^{3} \operatorname {Li}_{2}\left (-{\mathrm e}^{i \left (f x +e \right )}\right ) x}{a^{2} f^{3}}+\frac {4 d^{3} \operatorname {Li}_{3}\left (-{\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{4}}-\frac {4 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{4}}+\frac {4 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{a^{2} f^{4}}\) | \(678\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 771 vs. \(2 (228) = 456\).
Time = 0.31 (sec) , antiderivative size = 771, normalized size of antiderivative = 2.85 \[ \int \frac {(c+d x)^3}{(a+a \cos (e+f x))^2} \, dx=-\frac {3 \, d^{3} f^{2} x^{2} + 6 \, c d^{2} f^{2} x + 3 \, c^{2} d f^{2} + 3 \, {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2}\right )} \cos \left (f x + e\right ) + 6 \, {\left (-i \, d^{3} f x - i \, c d^{2} f + {\left (-i \, d^{3} f x - i \, c d^{2} f\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (-i \, d^{3} f x - i \, c d^{2} f\right )} \cos \left (f x + e\right )\right )} {\rm Li}_2\left (-\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right ) + 6 \, {\left (i \, d^{3} f x + i \, c d^{2} f + {\left (i \, d^{3} f x + i \, c d^{2} f\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (i \, d^{3} f x + i \, c d^{2} f\right )} \cos \left (f x + e\right )\right )} {\rm Li}_2\left (-\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right ) - 3 \, {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2} + 2 \, d^{3} + {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2} + 2 \, d^{3}\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2} + 2 \, d^{3}\right )} \cos \left (f x + e\right )\right )} \log \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + 1\right ) - 3 \, {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2} + 2 \, d^{3} + {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2} + 2 \, d^{3}\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (d^{3} f^{2} x^{2} + 2 \, c d^{2} f^{2} x + c^{2} d f^{2} + 2 \, d^{3}\right )} \cos \left (f x + e\right )\right )} \log \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + 1\right ) - 6 \, {\left (d^{3} \cos \left (f x + e\right )^{2} + 2 \, d^{3} \cos \left (f x + e\right ) + d^{3}\right )} {\rm polylog}\left (3, -\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right ) - 6 \, {\left (d^{3} \cos \left (f x + e\right )^{2} + 2 \, d^{3} \cos \left (f x + e\right ) + d^{3}\right )} {\rm polylog}\left (3, -\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right ) - {\left (2 \, d^{3} f^{3} x^{3} + 6 \, c d^{2} f^{3} x^{2} + 2 \, c^{3} f^{3} + 6 \, c d^{2} f + 6 \, {\left (c^{2} d f^{3} + d^{3} f\right )} x + {\left (d^{3} f^{3} x^{3} + 3 \, c d^{2} f^{3} x^{2} + c^{3} f^{3} + 6 \, c d^{2} f + 3 \, {\left (c^{2} d f^{3} + 2 \, d^{3} f\right )} x\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{3 \, {\left (a^{2} f^{4} \cos \left (f x + e\right )^{2} + 2 \, a^{2} f^{4} \cos \left (f x + e\right ) + a^{2} f^{4}\right )}} \]
[In]
[Out]
\[ \int \frac {(c+d x)^3}{(a+a \cos (e+f x))^2} \, dx=\frac {\int \frac {c^{3}}{\cos ^{2}{\left (e + f x \right )} + 2 \cos {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{3} x^{3}}{\cos ^{2}{\left (e + f x \right )} + 2 \cos {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c d^{2} x^{2}}{\cos ^{2}{\left (e + f x \right )} + 2 \cos {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c^{2} d x}{\cos ^{2}{\left (e + f x \right )} + 2 \cos {\left (e + f x \right )} + 1}\, dx}{a^{2}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 3275 vs. \(2 (228) = 456\).
Time = 1.00 (sec) , antiderivative size = 3275, normalized size of antiderivative = 12.08 \[ \int \frac {(c+d x)^3}{(a+a \cos (e+f x))^2} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {(c+d x)^3}{(a+a \cos (e+f x))^2} \, dx=\int { \frac {{\left (d x + c\right )}^{3}}{{\left (a \cos \left (f x + e\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(c+d x)^3}{(a+a \cos (e+f x))^2} \, dx=\text {Hanged} \]
[In]
[Out]